<?xml version="1.0"?>
<component name="org.nuxeo.ecm.multi.tenant.directories.override">

  <require>org.nuxeo.ecm.multi.tenant.directories</require>

  <extension point="directories" target="org.nuxeo.ecm.directory.GenericDirectory">

    <directory extends="template-directory" name="tenants">
      <schema>tenant</schema>
      <idField>id</idField>
      <entryCacheName>tenants-cache</entryCacheName>
      <entryCacheWithoutReferencesName>tenants-cache-without-ref</entryCacheWithoutReferencesName>
    </directory>

    <directory extends="template-directory" name="topic">
      <schema>multitenantvocabulary</schema>
      <idField>id</idField>
      <dataFile>directories/topic.csv</dataFile>
      <entryCacheName>topic-cache</entryCacheName>
      <entryCacheWithoutReferencesName>topic-cache-without-ref</entryCacheWithoutReferencesName>
      <deleteConstraint class="org.nuxeo.ecm.directory.HierarchicalDirectoryDeleteConstraint">
        <property name="targetDirectory">subtopic</property>
        <property name="targetDirectoryField">parent</property>
      </deleteConstraint>
    </directory>

    <directory extends="template-directory" name="subtopic">
      <schema>multitenantxvocabulary</schema>
      <idField>id</idField>
      <parentDirectory>topic</parentDirectory>
      <dataFile>directories/subtopic.csv</dataFile>
      <entryCacheName>subtopic-cache</entryCacheName>
      <entryCacheWithoutReferencesName>subtopic-cache-without-ref</entryCacheWithoutReferencesName>
    </directory>

    <directory extends="template-directory" name="l10nsubjects">
      <schema>multitenantl10nxvocabulary</schema>
      <idField>id</idField>
      <parentDirectory>l10nsubjects</parentDirectory>
      <dataFile>directories/l10nsubjects.csv</dataFile>
      <entryCacheName>l10nsubjects-cache</entryCacheName>
      <entryCacheWithoutReferencesName>l10nsubjects-cache-without-ref</entryCacheWithoutReferencesName>
      <deleteConstraint class="org.nuxeo.ecm.directory.HierarchicalDirectoryDeleteConstraint">
        <property name="targetDirectory">l10nsubjects</property>
        <property name="targetDirectoryField">parent</property>
      </deleteConstraint>
    </directory>

    <directory extends="template-directory" name="l10ncoverage">
      <schema>multitenantl10nxvocabulary</schema>
      <idField>id</idField>
      <parentDirectory>l10ncoverage</parentDirectory>
      <dataFile>directories/l10ncoverage.csv</dataFile>
      <entryCacheName>l10ncoverage-cache</entryCacheName>
      <entryCacheWithoutReferencesName>l10ncoverage-cache-without-ref</entryCacheWithoutReferencesName>
      <deleteConstraint class="org.nuxeo.ecm.directory.HierarchicalDirectoryDeleteConstraint">
        <property name="targetDirectory">l10ncoverage</property>
        <property name="targetDirectoryField">parent</property>
      </deleteConstraint>
    </directory>

  </extension>

</component>
